package main

import (
	"gitee.com/wu-jin-feng/kinfu/fgin"
	"github.com/gin-gonic/gin"
)

func main() {
	f := fgin.Fgin{}
	r := f.GetHttpServer("./test.yaml")
	// 消费者1
	mqObj1, err := fgin.DefaultQueue("frabbitmq_queue_test1")
	if err != nil {
		panic(err)
	}
	r.GET("/cha", func(ctx *gin.Context) {
		mqObj1.DefaultProducter("text", []byte("hahago"))
	})
	// 消费2
	mqObj2, err := fgin.DefaultQueue("frabbitmq_queue_test2")
	if err != nil {
		panic(err)
	}
	r.GET("/che", func(ctx *gin.Context) {
		mqObj2.DefaultProducter("text", []byte("hehehe"))

	})
	f.Run(r)
}
